home *** CD-ROM | disk | FTP | other *** search
/ Aminet 32 / Aminet 32 (1999)(Schatztruhe)[!][Aug 1999].iso / Aminet / dev / lang / Python152_Src.lha / Python152_Source / Amiga_Misc / Docs / amigapath_module < prev    next >
Text File  |  1999-04-28  |  2KB  |  99 lines

  1.  
  2.  
  3.                              AMIGAPATH MODULE
  4.  
  5.                      Irmen de Jong - irmen@bigfoot.com
  6.                                28 apr. 1999
  7.  
  8.  
  9. This  document describes the module `amigapath'.  This is the Amiga version
  10. of  the  `posixpath' module which is used on Unix.  You should not directly
  11. import this module!  Always use module `os' instead and then use os.path.
  12.  
  13. Functions in this module:
  14.  
  15.     abspath
  16.     basename
  17.     commonprefix
  18.     dirname
  19.     exists
  20.     expanduser
  21.     expandvars
  22. (*) fullpath
  23.     getatime
  24.     getmtime
  25.     getsize
  26. (*) isabs
  27.     isdir
  28.     isfile
  29.     islink
  30. (*) ismount
  31.     join
  32. (*) normcase
  33. (*) normpath
  34.     samefile
  35.     sameopenfile
  36.     samestat
  37. (*) split
  38. (*) splitdrive
  39.     splitext
  40. (*) walk
  41.  
  42. For  documentation, see docs on posixpath module.  Functions marked (*) are
  43. different from the ones in the posixpath module and are described below.
  44.  
  45.  
  46.   fullpath
  47.   ~~~~~~~~
  48. New Amiga-only function.  Returns the full pathname of a file/directory
  49. (i.e.  expands assigns).  Implemented in amiga module but don't use it
  50. directly from there, always use os.path.fullpath.
  51.  
  52.  
  53.   isabs
  54.   ~~~~~
  55. On the Amiga, a path is absolute when a ':' occurs in it.
  56.  
  57.  
  58.   ismount
  59.   ~~~~~~~
  60. On the Amiga, a mount point is considered to be a device name.
  61.  
  62.  
  63.   normcase
  64.   ~~~~~~~~
  65. On the Amiga, actually does convert the path to lowercase.
  66.  
  67.  
  68.   normpath
  69.   ~~~~~~~~
  70. On  the Amiga, does nothing because x/y//z is different than x/y/z, because
  71. a double slash (//) in a path means 'parent directory'.
  72.  
  73.  
  74.   split
  75.   ~~~~~
  76. Split  a  path in head (everything up to the last '/' or ':') and tail (the
  77. rest).  If the path ends in '/' or ':', tail will be empty.  If there is no
  78. '/'  or  ':'  in  the path, head will be empty.  DIFFERENCE WITH posixpath:
  79. only  ONE  trailing '/' will be stripped from head!  (on the Amiga a double
  80. slash  means  "parent  dir"!   ) This means that if head ends in a '/', you
  81. MUST  add  a  '/'  to it when reconstructing the path, or you will lose the
  82. "parent  dir"  slash.   Functions  that  depend  on  this function are also
  83. affected!  (basename, dirname)
  84.  
  85. (Suggested by Kent Polk, kent@eaenki.nde.swri.edu)
  86.  
  87.  
  88.   splitdrive
  89.   ~~~~~~~~~~
  90. Splits  a pathname into a drive specification and the rest of the path.  On
  91. the Amiga this is useful (not on Unix).
  92.  
  93.  
  94.   walk
  95.   ~~~~
  96. As  the  Amiga  doesn't  know  the  concept of '.' and '..' directories, no
  97. exceptions are made for them.
  98.  
  99.